<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSysTableColumnTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basedata_table_column', function (Blueprint $table) {
            $table->integer('id')->primary();
            $table->integer('table_model_id');
            $table->string('label', 50)->nullable()->comment('名称');
            $table->string('prop', 50)->nullable()->comment('字段');
            $table->string('width', 50)->nullable()->comment('宽度');
            $table->boolean('hide')->nullable()->default(false)->comment('隐藏');
            $table->boolean('sortable')->nullable()->default(false)->comment('排序');
            $table->string('filters')->default('')->comment('过滤');
            $table->boolean('fixed')->nullable()->default(false)->comment('固定');
            $table->integer('sort')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basedata_table_column');
    }
}
